IEnumSTATPROPSETSTG-Compound File Implementation

The compound file implementation of IEnumSTATPROPSETSTG interface is used to enumerate through an array of STATPROPSETSTGCS00R0 structures, which contain statistical information about the properties managed by the compound file implementation of IPropertySetStorage, which is associated with a current compound file storage object.

When to Use

Call the methods of IEnumSTATPROPSETSTG to enumerate STATPROPSETSTG structures, each of which provides information about one of the property sets associated with the compound file storage object.

Remarks

IEnumSTATPROPSETSTG::Next

Gets the next one or more STATPROPSETSTGCS00R0 structures (the number is specified by the celt parameter). The STATPROPSETSTG elements provided through a call to the compound file implementation of IEnumSTATPROPSETSTG::Next follow these rules:

    If IEnumSTATPROPSETSTG::Next cannot provide STATPROPSETSTG.fmtid, zeros are written to that member. This occurs when the property set does not have a predefined name (such as \005SummaryInformation) and is not a legal value.

    The DocumentSummaryInformation property set is special, in that it may have two property set sections.  This property set is described in the section titled The DocumentSummaryInformation Property Set11TZVHU. The second section is referred to as the User-Defined Properties.  Each section is identified with a unique Format ID.  When IPropertySetStorage::Enum is used to enumerate property sets, the User-Defined Property Set will not be enumerated.

 

 

Note  If you always create a property set using IPropertySetStorage::Create, then, since a  Character GUID  is created for the storage name, IEnumSTATPROPSETSTG::Next will return a nonzero, valid format identifier for the property set[STATPROPSETSTG.fmtid].

 

    The STATPROPSETSTG.grfFlags member does not necessarily reflect whether the property set is ANSI or not. If PROPSETFLAG_ANSI is set, the property set is definitely ANSI. If PROPSETFLAG_ANSI is clear, the property set could be either Unicode or non-Unicode, because it is not possible to tell whether it is ANSI without opening it.

    The STATPROPSETSTG.grfFlags member does reflect whether the property set is simple or not, so the setting of the PROPSETFLAG_NONSIMPLE flag is always valid.

    If IEnumSTATPROPSETSTG::Next cannot provide STATPROPSETSTG.clsid, it is set to all zeroes (CLSID_NULL). In the OLE compound file implementation, this occurs when the property set is simple (the PROPSETFLAG_NONSIMPLE flag is not set), or is non-simple but the CLSID was not explicitly set. For non-simple property sets, the CLSID that is received is the one that is maintained by the underlying IStorage.

    If IEnumSTATPROPSETSTG::Next cannot provide the time fields [ctime, mtime, atime], each non-supported time will be set to zeroes. In the OLE compound file implementation, getting these values depends on retrieving them from the underlying IStorage implementation.

IEnumSTATPROPSETSTG::Skip

Skips the number of elements specified in celt. Returns S_OK if the specified number of elements are skipped, returns S_FALSE if fewer elements than requested are skipped. In any other case, returns the appropriate error.

IEnumSTATPROPSETSTG::Reset

Sets the cursor to the beginning of the enumeration. If successful, returns S_OK, otherwise, returns STG_E_INVALIDHANDLE.

IEnumSTATPROPSETSTG::Clone

Copies the current enumeration state of this enumerator.